package com.ugoodtech.mdcc.core.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@ApiModel("用户与报告的共享")
@Entity
@Table(name = "user_report")
public class UserReport extends BaseEntity {

    @ApiModelProperty("关联的用户")
    private User user;

    @ApiModelProperty("关联的报告")
    private StationReport stationReport;

    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne
    @JoinColumn(name = "report_id")
    public StationReport getStationReport() {
        return stationReport;
    }

    public void setStationReport(StationReport stationReport) {
        this.stationReport = stationReport;
    }
}
